package org.qqcui.designpattern.patterns.state;

/**
 * 状态模式客户端
 *
 * @author cuiqingqiang
 * @version 1.0
 * @date 2022/5/7 14:35
 **/
public class Client {

    public static void main(String[] args) {
        // 初始化一个奖品的抽奖活动
        RaffleActivity activity = new RaffleActivity(1);

        // 30次抽奖
        for (int i = 0; i < 30; i++) {
            System.out.println("第" + (i+1) + "次抽奖……");
            // 扣积分
            activity.deduceScore();
            // 抽奖
            activity.raffle();
        }
    }
}
